<template>
	<view class="content">
		
		<u-empty mode="data" icon="../../static/images/not-data.png" text="暂无数据" v-if="!list">
		</u-empty>
		<view v-else class="list-group">
			<view v-for="(item,index) in list" :key="item.id" class="list-item"  @click="handleClick(item)">
				<view style="display: flex;justify-content: space-between;font-size: 28rpx;margin-bottom: 20rpx;">
					<view style="display: flex;align-items: center;">
						<view style="margin-right: 20rpx;color: #2979ff;" class="list-item-index">{{index+1}}</view>
						<view>{{item.assessmentName}}</view>
					</view>
					<view style="color: #999;font-size: 24rpx;">{{item.reportingMonth}}</view>
				</view>
				<u-line></u-line>
				<view style="font-size: 28rpx;">
					<u-row justify="space-between" customStyle="margin-top: 10px">
						<u-col span="6">
							<view style="display: flex;align-items: center;">
								<view style="color: #999999;">审核人：</view> <view>{{item.reviewerName}}</view>
							</view>
						</u-col>
						<u-col span="6">
							<view style="display: flex;align-items: center;">
								<view style="color: #999999;">节点：</view> 
								<view>{{item.nodeName}}</view>
							</view>
						</u-col>
					</u-row>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {GetAdutiView} from '@/api/main'
	export default {
		data() {
			return {
				list:[]
			}
		},
		onShow() {
			this.getData()
		},
		methods: {
			getData() {
				let formdata = new FormData()
				formdata.append('empId',uni.getStorageSync('empid'))
				formdata.append('status',1)
				GetAdutiView(formdata).then((response) => {
					console.log(response)
					this.list = response.data
				})
			},
			handleClick(item){
				uni.navigateTo({
					url:`/pages/summary/staff-list?id=${item.id}&status=${item.status}`
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	.list-group {
		padding: 20rpx;

		.list-item {
			padding: 30rpx;
			background: #ecf5ff;
			margin-bottom: 30rpx;
			border-radius: 10rpx;

			.list-item-index {
				display: flex;
				border: 1px solid #5F9EA0;
				width: 40rpx;
				height: 40rpx;
				align-items: center;
				justify-content: center;
				border-radius: 44rpx;
				font-size: 24rpx;

			}

			.status {
				color: #008B8B;
				font-weight: 400;
			}

			.actions {
				background: #2db7f5;
				color: #ffffff;
				padding: 4rpx 18rpx;
				border-radius: 5rpx;
				font-size: 26rpx;
			}
		}
	}
</style>